package com.mxpio.erp.common.hr.entity;

import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_HR_ATTENDANCE_CALENDAR")
@Schema(description="考勤工作日历")
public class AttendanceCalendar extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @Id
    @Generator
    @Column(name = "ID_", updatable = false)
    @Schema(description = "ID")
    private String id;

    @Column(name = "DATE_",updatable = false,columnDefinition="varchar(255) NOT NULL UNIQUE")
    @Schema(description = "日期")
    private String date;

    @Column(name = "YEAR_",updatable = false)
    @Schema(description = "年份")
    private String year;

    @Column(name = "MONTH_",updatable = false)
    @Schema(description = "月份")
    private String month;

    /*@Column(name = "YEARWEEK_",updatable = false)
    @Schema(description = "年周")
    private Integer yearweek;

    @Column(name = "YEARDAY_",updatable = false)
    @Schema(description = "年天")
    private Integer yearday;*/

    @Column(name = "DATE_TYPE_")
    @Schema(description = "日历类型")
    @Dict(dicCode = "MB_ERP_HR_ATTENDANCE_CALENDAR_DATETYPE")//0工作日 1周末 2节假日
    private String dateType;
}
